import {createRouter,createWebHashHistory} from 'vue-router'
import Home from '@/pages/Layout/Home'
import Login from '@/pages/Layout/Login'
import Register from '@/pages/Layout/Register'
import Write from '@/pages/Layout/Write'
import Settings from '@/pages/Layout/Settings'
import ShowArticle from '@/pages/Layout/ShowArticle'
import MyHomePage from '@/pages/Layout/MyHomePage'
const history=createWebHashHistory()
const router=createRouter({
    history,
    routes:[
        {
            path:'/',
            redirect:'/home'
        },
        {
            path:'/home',
            component:Home
        },
        {
            path:'/login',
            component:Login
        },
        {
            path:'/register',
            component:Register
        },
        {
            path:'/write',
            component:Write
        },
        {
            path:'/settings',
            component:Settings
        },
        {
            path:'/showarticle',
            component:ShowArticle
        },
        {
            path:'/myhomepage',
            component:MyHomePage
        }
    ]
})

export default router